<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var sum = 100;
        do {
            var i = prompt('请输入您要的操作：\n1.存钱\n2.取钱\n3.显示余额\n4.退出');
            switch (i) {
                case '1':
                    var a = prompt('请您输入存的钱数：');
                    sum += (a - 0);
                    alert('您现在的钱数是：' + sum);
                    break;
                case '2':
                    var a = prompt('请您输入取的钱数：');
                    sum -= (a - 0);
                    alert('您现在的钱数是：' + sum);
                    break;
                case '3':
                    alert('您现在的钱数是：' + sum);
                    break;
                case '4':
                    alert('您正在退出！');
            }
        } while (i != 4)
    </script>
</head>

<body>

</body>

</html>